package com.xzz.mybatis.generator.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xzz.mybatis.generator.annotation.MyAnnotation;
import com.xzz.mybatis.generator.bean.entity.User;
import com.xzz.mybatis.generator.bean.mapper.UserMapper;
import com.xzz.mybatis.generator.quartz.MyQuartzJob;
import com.xzz.mybatis.generator.quartz.MyScheduled;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @author: hhz
 * @createDate: 2021-3-11
 */
@Service
public class UserService extends ServiceImpl<UserMapper, User>{
    @MyAnnotation
    public List<User> getList(){
        return baseMapper.selectList(new QueryWrapper<>());
    }
    @MyScheduled(cron = "0 0 2 * * ? *", jobEnum = MyQuartzJob.FIRST_JOB)
    public void firstJob(){
        System.out.println("firstJob");
    }

    public void test() {

        System.out.println("test");
    }
}
